package com.springexample.demo.component;

import lombok.Builder;
import lombok.Data;

/**
 * 响应实体
 */
@Data
@Builder
public class Response {
    private int code;
    private Object data;
    private boolean flag;

    /**
     * 成功
     */
    public static Response sucess(Object data){
        return Response.builder().flag(true).code(200).data(data).build();
    }
}
